home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 2789 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  823 b 

  1. Path: news.uh.edu!sukku
  2. From: sukku@menudo.uh.edu (sukumar)
  3. Newsgroups: comp.lang.c
  4. Subject: Interesting declaration???
  5. Date: 23 Jan 1996 22:50:09 GMT
  6. Organization: University of Houston
  7. Message-ID: <4e3on1$iir@masala.cc.uh.edu>
  8. NNTP-Posting-Host: menudo.uh.edu
  9. X-Newsreader: TIN [version 1.2 PL2]
  10.  
  11. Hi there,
  12.     I was going through some of the header files of Motif and found an
  13. interesting declaration like this:
  14.  
  15. typedef enum{
  16.         NONE,
  17.         ONE,
  18.         TWO} TabelType;
  19.  
  20. #define TableType unsigned char
  21.  
  22.  
  23. I haven't seen this kind of declartion before and I tried it after seeing this
  24. and it worked.!! I was expecting the compiler to throw a flag. Why would
  25. someone do this?? 
  26.  
  27. My best guess is that they are making sure the TableType gets only one
  28. byte instead of four (On Unix).
  29.  
  30. Can someone throw some light on this??
  31.  
  32. TIA
  33. Srini. 
  34.